package com.berkeley.db.berkeleydb;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/car")
public class CarScoreController {
	@Autowired
	private CarScoreStore carScoreStore;

	@GetMapping("/put")
	public void put(){
		CarScore carScore=new CarScore();
		carScore.setCarId("1");
		carScore.setName("奔驰");
		carScoreStore.put(carScore);
	}
	@GetMapping("/get")
	public Object get(){
		return carScoreStore.get("1");
	}
	@GetMapping("/delete")
	public void delete(){
		carScoreStore.delete("1");
	}


}
